﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2013/6/21 星期五 21:25:41
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sector7.Medical.Utility;
using Sector7.Medical.EntityType;
using Sector7.Medical.Enums;

namespace Sector7.Medical.Biz
{
    /// <summary>
    /// SYSS代理
    /// </summary>
    public class Agent_SYSS
    {
        #region Public functions
        /// <summary>
        /// 获取一元种子
        /// </summary>
        /// <param name="arg1"></param>
        /// <returns></returns>
        public static int GetUnarySeed(string arg1)
        {
            return WcfClient.SYSS.Invoke<int>(
                service => service.GetUnarySeed(arg1));
        }

        /// <summary>
        /// 获取二元种子
        /// </summary>
        /// <param name="arg1"></param>
        /// <param name="arg2"></param>
        /// <returns></returns>
        public static int GetBinarySeed(string arg1, string arg2)
        {
            return WcfClient.SYSS.Invoke<int>(
                service => service.GetBinarySeed(arg1, arg2));
        }

        /// <summary>
        /// 获取三元种子
        /// </summary>
        /// <param name="arg1"></param>
        /// <param name="arg2"></param>
        /// <param name="arg3"></param>
        /// <returns></returns>
        public static int GetTernarySeed(string arg1, string arg2, string arg3)
        {
            return WcfClient.SYSS.Invoke<int>(
                service => service.GetTernarySeed(arg1, arg2, arg3));
        }

        /// <summary>
        /// 系统登录
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <param name="role"></param>
        /// <returns></returns>
        public static string Login(string username, string password, AccessRoleType role)
        {
            return WcfClient.SYSS.Invoke<string>(
                service => service.Login(username, password, role));
        }

        /// <summary>
        /// 获取员工信息
        /// </summary>
        /// <param name="uniqueId"></param>
        /// <returns></returns>
        public static M7_Employee GetEmployee(string uniqueId)
        {
            return WcfClient.INFS.Invoke<M7_Employee>(
                service => service.GetEmployee(uniqueId));
        }

        /// <summary>
        /// 获取系统用户名
        /// </summary>
        /// <param name="fullName"></param>
        /// <returns></returns>
        public static string GetUsername(string fullName)
        {
            return WcfClient.SYSS.Invoke<string>(
                service => service.GetUsername(fullName));
        }
        #endregion

        #region Private functions
        #endregion
    }
}
